<?php
/**
 * Created by PhpStorm
 * User: whh
 * Date: 2023/8/4
 * Time: 11:53
 */

namespace app\common\model;

use think\Model;

class NovelClassSon extends Model
{
    protected $table = 'novel_class_son';
    use Common;


    /**
     * 频道
     * @return \think\model\relation\HasOne
     * @Author: whh
     */
    public function freq()
    {
        return $this->hasOne(NovelFreq::class, 'id', 'freq_id');
    }


    /**
     * 分类
     * @return \think\model\relation\HasOne
     * @Author: whh
     */
    public function parentClass()
    {
        return $this->hasOne(NovelClass::class, 'id', 'class_id');
    }

}